﻿Module ResourceAdministrator

    Public Sub insert(ByRef resource As Resource)
        ResourceDao.insert(resource)
    End Sub

    Public Sub update(ByRef resource As Resource)
        ResourceDao.update(resource)
    End Sub

    Public Function search() As Data.DataTable
        Return ResourceDao.searchData(New Resource(), "id, firstname, surname, email, create_date, hour_cost")
    End Function

    Public Function search(ByVal stringSelect As String) As Data.DataTable
        Return ResourceDao.searchData(New Resource(), stringSelect)
    End Function

    Public Function searchDataByFilter(ByRef resource As Resource) As Data.DataTable
        Return ResourceDao.searchDataByFilter(resource)
    End Function

    Public Function searchDataById(ByVal stringSelect As String, ByVal id As Integer) As Data.DataTable
        Return ResourceDao.searchDataById(New Resource(id), stringSelect)
    End Function

    Public Sub disabled(ByRef resource As Resource)
        ResourceDao.disabled(resource)
    End Sub
End Module
